catchError

abstract fun catchError(onRejected: JsPromiseHandler): JsPromise

Registers a rejection handler for this promise and returns a new one.

The handler is called immediately if the promise is already rejected.

Parameters

onRejected

a handler that is invoked if the promise is rejected

See also

Throws

if the JavaScript promise is already disposed